-
Notifications
You must be signed in to change notification settings - Fork 309
Add extra
parameter to the validate functions
#1722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
please review |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #1722 will not alter performanceComparing Summary
|
CI checks are failing with:
Hopefully a temporary issue. But how do I re-run them? [Edit: a force-push or two later, everything seems ok now] |
74c3cd9
to
559a3e0
Compare
@sydney-runkle anything I can do to help get this merged? |
@davidhewitt this has been gathering dust for a while.. anything preventing it from being merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay @anvilpete, I think this makes sense to include. Left some initial comments
559a3e0
to
ab4e9b1
Compare
Thanks @Viicos, all good points. I've left my fixes unsquashed for your review. |
Once this is merged and released, here's the corresponding update to Pydantic: pydantic/pydantic#12233. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this LGTM, will merge and get in a release shortly!
Change Summary
This change adds an
extra
parameter to the validation functions, overriding any other model configuration. After a corresponding update to Pydantic, this will enable the following from pydantic/pydantic#9278:I've tried to add tests and update existing ones where it makes sense. It's a very small change but touches a wide surface area, so please let me know if I've missed anything.
See also pydantic/pydantic#11057 for a similar request.
Related issue number
Checklist
pydantic-core
(except for expected changes)Selected Reviewer: @sydney-runkle